<?php  

import('miho.test.exception.*');

/**
* 
*/
abstract class Test
{
  
  /**
   * Fail message
   *
   * @var string
   */
  protected $_fail;
  public function getFail(){
    return $this->_fail;
  }
  
  public function __construct()
  {
    
  }
  
  abstract function test();
  
  public function fail($message=""){
    $this->_fail = $message;
    throw new TestFailException($this);
  }
  
  public function assertTrue($expression, $message=""){
    if($expression != TRUE){
      $this->fail($message);
    }
  }
  
  public function assertFalse($expression, $message=""){
    if(!$expression != FALSE){
      $this->fail($message);
    }
  }
  
  public function __toString(){
    return '['.__CLASS__.']';
  }
}


?>